package com.example.vue20220402.controller;


import com.example.vue20220402.pojo.Role;
import com.example.vue20220402.service.RoleService;
import com.example.vue20220402.vo.ResultData;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import sun.rmi.server.InactiveGroupException;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author rock
 * @since 2022-04-02
 */
@RestController
@RequestMapping("/role")
public class RoleController {

    @Resource
    RoleService roleService;

    @RequestMapping("/list")
    public ResultData list(){
        return roleService.list();
    }

    //  角色列表  带角色对应的权限数据
    @RequestMapping("/rolelist")
    public ResultData rolelist(Role role){
        return roleService.rolelist(role);
    }

    @RequestMapping("/updaterolepowers")
    public ResultData updaterolepowers(Role role){
        return roleService.updaterolepowers(role);
    }


}

